All information that is generated within Content Studio is stored in XML format. Hence, the information is easily exported to other system and it is human readable. It can also be used within the website to manage different kind of information. A typical disadvantage with this data format is that it is rather slow with searches because the data by nature is unordered.

To avoid this, Content Studio uses an XML index engine to get quick access to all data. All information that is created via API call, web service calls, the website or the administrative user interface automatically is indexed.

The index is updated whenever the document is saved. Draft documents are stored too, which means that one document may have several entries in the XML index. The XML data is sorted alphabetically and treats all data as text (even numerical data).

Activating the index

All document categories containing XML documents (i.e. EPT documents) can be indexed via the properties on category level. The XML index keeps track of all fields that are explicitly marked to be indexed. All other fields are discarded by the XML index engine.

When a field has been marked for indexing a background job is initiated. Therefore it may take a short while until all documents have been indexed. The XML indexing operation can also be initiated manually via the Properties of the category root node.

Components and methods

Searching and filtering is normally done with one of the AS components listed below. The XML index is also accessible via the XmlFilter programming API class.

Common components that work with the Xml index
AS component Description
Script filtered documents Returns a list of documents according to the specified criteria. During rendering a developer has full programatic control over how the output is rendered through ASP.NET code. This is perhaps the most powerful of the EPT components but requires basic programming skills.
List pageable filtered documents 2.0 Lists documents according to the specified criteria. The presentation is pageable.
Insert filtered documents 2.0 Includes documents with Presentation templates according to the specified criteria.
List filtered documents in dropdown advanced 2.0 Creates a drop-down list according to the specified criteria.
List pageable filtered documents 2.0 Randomly includes one or more document based on a filter criteria. In Content Studio 5.x this component has an option to return documents in a random sort order.

In a presentation template, which is used to present the content of an EPT document, it is very easy to programmatically access the value of any of the Xml fields in the document presented. This is accomplished by using the CS_DataFields property which returns an EPTXmlParser object. This property is available in any Content Studio page but is useful only in a presentation template.

This code example shows how to get the value of an EPT field named "Header".

 try
{
  Response.Write(Server.HtmlEncode("Fieldvalue: " + CS_DataFields["Header"]));
}
catch (ContentStudio.CSException ex)
{
  Response.Write("<b>" + Server.HtmlEncode(CS_TranslateMessage(ex)) + "</b>");
}
catch (Exception ex)
{
  Response.Write("<b>" + Server.HtmlEncode(ex.Message) + "</b>");
} 
Try
  Response.Write(Server.HtmlEncode("Fieldvalue: " & CS_DataFields("Header")))
Catch ex As ContentStudio.CSException
  Response.Write("<b>" + Server.HtmlEncode(CS_TranslateMessage(ex)) + "</b>")
Catch ex As Exception
  Response.Write("<b>" + Server.HtmlEncode(ex.Message) + "</b>")
End Try